import re

msg = """
[1695178207.928709][128928:128930] CHIP:EM: Found matching exchange: 49206i, Delegate: 0xffffa0010020
[1695178207.928776][128928:128930] CHIP:EM: Rxd Ack; Removing MessageCounter:199199818 from Retrans Table on exchange 49206i
[1695178207.928886][128928:128930] CHIP:DMG: ReportDataMessage =
[1695178207.928941][128928:128930] CHIP:DMG: {
[1695178207.928983][128928:128930] CHIP:DMG: 	AttributeReportIBs =
[1695178207.929068][128928:128930] CHIP:DMG: 	[
[1695178207.929119][128928:128930] CHIP:DMG: 		AttributeReportIB =
[1695178207.929185][128928:128930] CHIP:DMG: 		{
[1695178207.929256][128928:128930] CHIP:DMG: 			AttributeStatusIB =
[1695178207.929318][128928:128930] CHIP:DMG: 			{
[1695178207.929392][128928:128930] CHIP:DMG: 				AttributePathIB =
[1695178207.929460][128928:128930] CHIP:DMG: 				{
[1695178207.929527][128928:128930] CHIP:DMG: 					Endpoint = 0x0,
[1695178207.929618][128928:128930] CHIP:DMG: 					Cluster = 0x34,
[1695178207.929686][128928:128930] CHIP:DMG: 					Attribute = 0x0000_0000,
[1695178207.929770][128928:128930] CHIP:DMG: 				}
[1695178207.929843][128928:128930] CHIP:DMG: 					
[1695178207.929923][128928:128930] CHIP:DMG: 				StatusIB =
[1695178207.929990][128928:128930] CHIP:DMG: 				{
[1695178207.930055][128928:128930] CHIP:DMG: 					status = 0xc3 (UNSUPPORTED_CLUSTER),
[1695178207.930139][128928:128930] CHIP:DMG: 				},
[1695178207.930206][128928:128930] CHIP:DMG: 				
[1695178207.930263][128928:128930] CHIP:DMG: 			},
[1695178207.930347][128928:128930] CHIP:DMG: 			
[1695178207.930401][128928:128930] CHIP:DMG: 		},
[1695178207.930480][128928:128930] CHIP:DMG: 		
[1695178207.930530][128928:128930] CHIP:DMG: 	],
[1695178207.930591][128928:128930] CHIP:DMG: 	
[1695178207.930657][128928:128930] CHIP:DMG: 	SuppressResponse = true, 
[1695178207.930714][128928:128930] CHIP:DMG: 	InteractionModelRevision = 1
[1695178207.930762][128928:128930] CHIP:DMG: }
[1695178207.931041][128928:128930] CHIP:TOO: Response Failure: IM Error 0x000005C3: General error: 0xc3 (UNSUPPORTED_CLUSTER)
[1695178207.931280][128928:128930] CHIP:EM: <<< [E:49206i S:50367 M:199199819 (Ack:36888487)] (S) Msg TX to 1:00000000000006DF [9873] --- Type 0000:10 (SecureChannel:StandaloneAck)
[1695178207.931379][128928:128930] CHIP:IN: (S) Sending msg 199199819 on secure session with LSID: 50367

"""

if 'Response Failure' in msg:
    pat = 'Response Failure: IM Error .*: General error: (.*) \(.*\)'
    re.compile(pat)
    err_code = re.findall(pat, msg)
    if len(err_code) > 0:
        print(err_code[0])